package com.symria.server.http;

import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;
import com.symria.server.http.bean.AdRequest;
import com.symria.server.http.bean.AdShow;

public class MainDo {
	public List<AdRequest> a;
    List<AdShow> b;
 
    public static void main(String[] args) throws ClassNotFoundException, SecurityException, NoSuchFieldException {
        Field field = MainDo.class.getField("a");
        Type genericFieldType = field.getGenericType();
        if(genericFieldType instanceof ParameterizedType){
            ParameterizedType aType = (ParameterizedType) genericFieldType;
            Type[] fieldArgTypes = aType.getActualTypeArguments();
            for(Type fieldArgType : fieldArgTypes){
                Class fieldArgClass = (Class) fieldArgType;
                System.out.println("fieldArgClass = " + fieldArgClass);
            }
        }
    }
}
